<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>footer</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    body {
      display: flex;
      flex-flow: column;
      min-height: 100vh;
      /* overflow: auto; */
    }
    .main {
      flex: 1;
      transform: scale(1);
    }
    .fixed {
      position: fixed;
      top: 0;
      left: 0;
      color: red;
      font-weight: bold;
    }
  </style>
</head>
<body>
  <header> 
    <h1>头部</h1> 
 </header> 
 <div class="main"> 
    <p>测试文字内容</p> 
    <p>测试文字内容</p>
    <span class="fixed">fixed</span>
 </div> 
 <footer> 
    <p>X</p> 
 </footer>
</body>
</html>